import java.util.Scanner;

public class Cylinder extends Circle{
    private double height;
    public Cylinder(){

    }
    public Cylinder(double radious,double height){
        this.radious = radious;
        this.height = height;
    }

    @Override
    public double getArea() {
        double area = 3.14*radious*radious*2+getPerimeter()*height;
        return area;
    }
    public double getVolume(){
        double volume = super.getArea()*height;
        return volume;
    }
    public static void main(String[] args){
        double radious,height;
        Scanner h = new Scanner(System.in);
        System.out.println("请输入圆柱的高：");
        height = h.nextDouble();
        Scanner r = new Scanner(System.in);
        System.out.println("请输入圆柱的底面半径：");
        radious = r.nextDouble();
        Cylinder c = new Cylinder(radious,height);
        System.out.println("圆柱的表面积为："+c.getArea());
        System.out.println("圆柱的体积为："+c.getVolume());

    }
}
